#coding=utf-8
import os
import time
from selenium import webdriver
import sys
sys.path.append('..')
from  framework.basePage import  BasePage

class TestScreenshot(object):
    dir = os.path.dirname(os.path.abspath('.'))
    chrome_driver_path = dir + '/tools/chromedriver.exe'
    driver = webdriver.Chrome(chrome_driver_path)
    driver.maximize_window()
    basepage = BasePage(driver)

    def test_take_screen(self):
        path ='https://www.baidu.com'
        self.basepage.open_url(path)
        time.sleep(2)
        self.basepage.take_screenshot()
        self.basepage.quit_browser()

test = TestScreenshot()
test.test_take_screen()